/**
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright 2017 © yangxiaobing, 873559947@qq.com
 *
 * This file is part of contentManagerSystem.
 * contentManagerSystem is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * contentManagerSystem is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with contentManagerSystem.  If not, see <http://www.gnu.org/licenses/>.
 *
 * 这个文件是contentManagerSystem的一部分。
 * 您可以单独使用或分发这个文件，但请不要移除这个头部声明信息.
 * contentManagerSystem是一个自由软件，您可以自由分发、修改其中的源代码或者重新发布它，
 * 新的任何修改后的重新发布版必须同样在遵守GPL3或更后续的版本协议下发布.
 * 关于GPL协议的细则请参考COPYING文件，
 * 您可以在contentManagerSystem的相关目录中获得GPL协议的副本，
 * 如果没有找到，请连接到 http://www.gnu.org/licenses/ 查看。
 *
 * - Author: yangxiaobing
 * - Contact: 873559947@qq.com
 * - License: GNU Lesser General Public License (GPL)
 * - source code availability: http://git.oschina.net/yangxiaobing_175/contentManagerSystem
 */
package com.yxb.cms.domain.vo;

import com.yxb.cms.architect.utils.DateUtil;
import com.yxb.cms.domain.dto.PageDto;

import java.io.Serializable;
import java.util.Date;
/**
 * 站内公告信息表
 * @author yangxiaobing
 * @date  2017/9/1
 *
 */
public class  AnnouncementInfo extends PageDto implements Serializable{
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_id
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private Integer announcementId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_type
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private Integer announcementType;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_title
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private String announcementTitle;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_content
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private String announcementContent;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_author
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private String announcementAuthor;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column cc_announcement_info.announcement_time
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    private Date announcementTime;



    private String beginTime;

    private String endTime;



    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_id
     *
     * @return the value of cc_announcement_info.announcement_id
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public Integer getAnnouncementId() {
        return announcementId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_id
     *
     * @param announcementId the value for cc_announcement_info.announcement_id
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementId(Integer announcementId) {
        this.announcementId = announcementId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_type
     *
     * @return the value of cc_announcement_info.announcement_type
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public Integer getAnnouncementType() {
        return announcementType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_type
     *
     * @param announcementType the value for cc_announcement_info.announcement_type
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementType(Integer announcementType) {
        this.announcementType = announcementType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_title
     *
     * @return the value of cc_announcement_info.announcement_title
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public String getAnnouncementTitle() {
        return announcementTitle;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_title
     *
     * @param announcementTitle the value for cc_announcement_info.announcement_title
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementTitle(String announcementTitle) {
        this.announcementTitle = announcementTitle == null ? null : announcementTitle.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_content
     *
     * @return the value of cc_announcement_info.announcement_content
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public String getAnnouncementContent() {
        return announcementContent;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_content
     *
     * @param announcementContent the value for cc_announcement_info.announcement_content
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementContent(String announcementContent) {
        this.announcementContent = announcementContent == null ? null : announcementContent.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_author
     *
     * @return the value of cc_announcement_info.announcement_author
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public String getAnnouncementAuthor() {
        return announcementAuthor;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_author
     *
     * @param announcementAuthor the value for cc_announcement_info.announcement_author
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementAuthor(String announcementAuthor) {
        this.announcementAuthor = announcementAuthor == null ? null : announcementAuthor.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column cc_announcement_info.announcement_time
     *
     * @return the value of cc_announcement_info.announcement_time
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public Date getAnnouncementTime() {
        return announcementTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column cc_announcement_info.announcement_time
     *
     * @param announcementTime the value for cc_announcement_info.announcement_time
     *
     * @mbggenerated Fri Sep 01 00:04:17 CST 2017
     */
    public void setAnnouncementTime(Date announcementTime) {
        this.announcementTime = announcementTime;
    }


    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    /**
     * 公告日期格式化
     * @return
     */
    public String getAnnouncementTime_Lable(){
        if(this.getAnnouncementTime() != null){
            return DateUtil.Date2Stirng2Second(announcementTime);
        }
        return "";
    }

    /**
     * 公告类型格式化
     * @return
     */
    public String getAnnouncementType_Lable(){
        if(this.getAnnouncementType() != null && this.getAnnouncementType().intValue() == 1){
            return "系统公告";
        }else if(this.getAnnouncementType() != null && this.getAnnouncementType().intValue() == 2){
            return "活动公告";
        }else{
            return "";
        }

    }
}